﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" EnableEventValidation="false"
 CodeFile="ViewSalesSummary.aspx.cs" Inherits="reports_ViewSalesSummary" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
    <title>
        <%=GetGlobalResourceObject("General", "SalesSummary")%>
        - GG-CRM - กล้วยๆ.com - Teledirect Thailand</title>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitle" runat="Server">
    <h1>
        <asp:Label runat="server" Text="<%$Resources:General,SalesSummary%>" ID="lblPageName"></asp:Label></h1>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label runat="server" Text="<%$Resources:General,LangOption%>" Visible="false"
        ID="lblLangOption" />
    <div class="bc2">
        <asp:Label runat="server" ID="lblSiteLocation" Text="You are here : " CssClass="bclist" />
        <asp:SiteMapPath SiteMapProvider="SiteUserSiteMapProvider" ID="smpProvider" runat="server"
            PathSeparator=" : ">
            <PathSeparatorStyle CssClass="bcarrow" />
            <CurrentNodeStyle CssClass="bclist" />
            <NodeStyle CssClass="bclink" />
            <RootNodeStyle CssClass="bclink" />
        </asp:SiteMapPath>
        <div class="clear">
        </div>
    </div>
    <div class="topdisplay pb10">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="flattable">
            <tr>
                <td style="width:10%;">
                    <%=GetGlobalResourceObject("CarInsurance", "ReportType")%>
                </td>
                <td style="width:30%">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:DropDownList ID="ddlReportType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlReportType_SelectedIndexChanged">
                                <asp:ListItem Value="0" Text="<%$Resources:General,Monthly%>"></asp:ListItem>
                                <asp:ListItem Value="1" Selected="True" Text="<%$Resources:General,Daily%>"></asp:ListItem>
                            </asp:DropDownList>
                            &nbsp;<asp:Label ID="lblFromDate" runat="server"></asp:Label>
                            <asp:DropDownList ID="ddlDay1" runat="server" ToolTip="Choose Day">
                                <asp:ListItem Value="01">01</asp:ListItem>
                                <asp:ListItem Value="02">02</asp:ListItem>
                                <asp:ListItem Value="03">03</asp:ListItem>
                                <asp:ListItem Value="04">04</asp:ListItem>
                                <asp:ListItem Value="05">05</asp:ListItem>
                                <asp:ListItem Value="06">06</asp:ListItem>
                                <asp:ListItem Value="07">07</asp:ListItem>
                                <asp:ListItem Value="08">08</asp:ListItem>
                                <asp:ListItem Value="09">09</asp:ListItem>
                                <asp:ListItem Value="10">10</asp:ListItem>
                                <asp:ListItem Value="11">11</asp:ListItem>
                                <asp:ListItem Value="12">12</asp:ListItem>
                                <asp:ListItem Value="13">13</asp:ListItem>
                                <asp:ListItem Value="14">14</asp:ListItem>
                                <asp:ListItem Value="15">15</asp:ListItem>
                                <asp:ListItem Value="16">16</asp:ListItem>
                                <asp:ListItem Value="17">17</asp:ListItem>
                                <asp:ListItem Value="18">18</asp:ListItem>
                                <asp:ListItem Value="19">19</asp:ListItem>
                                <asp:ListItem Value="20">20</asp:ListItem>
                                <asp:ListItem Value="21">21</asp:ListItem>
                                <asp:ListItem Value="22">22</asp:ListItem>
                                <asp:ListItem Value="23">23</asp:ListItem>
                                <asp:ListItem Value="24">24</asp:ListItem>
                                <asp:ListItem Value="25">25</asp:ListItem>
                                <asp:ListItem Value="26">26</asp:ListItem>
                                <asp:ListItem Value="27">27</asp:ListItem>
                                <asp:ListItem Value="28">28</asp:ListItem>
                                <asp:ListItem Value="29">29</asp:ListItem>
                                <asp:ListItem Value="30">30</asp:ListItem>
                                <asp:ListItem Value="31">31</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlMonth1" runat="server">
                                <asp:ListItem Value="01">Jan</asp:ListItem>
                                <asp:ListItem Value="02">Feb</asp:ListItem>
                                <asp:ListItem Value="03">Mar</asp:ListItem>
                                <asp:ListItem Value="04">Apr</asp:ListItem>
                                <asp:ListItem Value="05">May</asp:ListItem>
                                <asp:ListItem Value="06">Jun</asp:ListItem>
                                <asp:ListItem Value="07">Jul</asp:ListItem>
                                <asp:ListItem Value="08">Aug</asp:ListItem>
                                <asp:ListItem Value="09">Sep</asp:ListItem>
                                <asp:ListItem Value="10">Oct</asp:ListItem>
                                <asp:ListItem Value="11">Nov</asp:ListItem>
                                <asp:ListItem Value="12">Dec</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlYear1" runat="server">
                                <asp:ListItem Value="2010">2010</asp:ListItem>
                                <asp:ListItem Value="2011">2011</asp:ListItem>
                                <asp:ListItem Value="2012">2012</asp:ListItem>
                                <asp:ListItem Value="2013">2013</asp:ListItem>
                            </asp:DropDownList>
                            &nbsp;
                            <asp:Label ID="lblToDate" runat="server"></asp:Label>
                            <asp:DropDownList ID="ddlDay2" runat="server" ToolTip="Choose Day">
                                <asp:ListItem Value="01">01</asp:ListItem>
                                <asp:ListItem Value="02">02</asp:ListItem>
                                <asp:ListItem Value="03">03</asp:ListItem>
                                <asp:ListItem Value="04">04</asp:ListItem>
                                <asp:ListItem Value="05">05</asp:ListItem>
                                <asp:ListItem Value="06">06</asp:ListItem>
                                <asp:ListItem Value="07">07</asp:ListItem>
                                <asp:ListItem Value="08">08</asp:ListItem>
                                <asp:ListItem Value="09">09</asp:ListItem>
                                <asp:ListItem Value="10">10</asp:ListItem>
                                <asp:ListItem Value="11">11</asp:ListItem>
                                <asp:ListItem Value="12">12</asp:ListItem>
                                <asp:ListItem Value="13">13</asp:ListItem>
                                <asp:ListItem Value="14">14</asp:ListItem>
                                <asp:ListItem Value="15">15</asp:ListItem>
                                <asp:ListItem Value="16">16</asp:ListItem>
                                <asp:ListItem Value="17">17</asp:ListItem>
                                <asp:ListItem Value="18">18</asp:ListItem>
                                <asp:ListItem Value="19">19</asp:ListItem>
                                <asp:ListItem Value="20">20</asp:ListItem>
                                <asp:ListItem Value="21">21</asp:ListItem>
                                <asp:ListItem Value="22">22</asp:ListItem>
                                <asp:ListItem Value="23">23</asp:ListItem>
                                <asp:ListItem Value="24">24</asp:ListItem>
                                <asp:ListItem Value="25">25</asp:ListItem>
                                <asp:ListItem Value="26">26</asp:ListItem>
                                <asp:ListItem Value="27">27</asp:ListItem>
                                <asp:ListItem Value="28">28</asp:ListItem>
                                <asp:ListItem Value="29">29</asp:ListItem>
                                <asp:ListItem Value="30">30</asp:ListItem>
                                <asp:ListItem Value="31">31</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlMonth2" runat="server">
                                <asp:ListItem Value="01">Jan</asp:ListItem>
                                <asp:ListItem Value="02">Feb</asp:ListItem>
                                <asp:ListItem Value="03">Mar</asp:ListItem>
                                <asp:ListItem Value="04">Apr</asp:ListItem>
                                <asp:ListItem Value="05">May</asp:ListItem>
                                <asp:ListItem Value="06">Jun</asp:ListItem>
                                <asp:ListItem Value="07">Jul</asp:ListItem>
                                <asp:ListItem Value="08">Aug</asp:ListItem>
                                <asp:ListItem Value="09">Sep</asp:ListItem>
                                <asp:ListItem Value="10">Oct</asp:ListItem>
                                <asp:ListItem Value="11">Nov</asp:ListItem>
                                <asp:ListItem Value="12">Dec</asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddlYear2" runat="server">
                                <asp:ListItem Value="2010">2010</asp:ListItem>
                                <asp:ListItem Value="2011">2011</asp:ListItem>
                                <asp:ListItem Value="2012">2012</asp:ListItem>
                                <asp:ListItem Value="2013">2013</asp:ListItem>
                            </asp:DropDownList>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
                <td style="width:60%">
                    <asp:Button ID="ibtSubmit" runat="server" Width="80px" Text="<%$Resources:General,Search%>"
                        OnClick="ibtSubmit_Click" CssClass="blueB ml10" />
                    <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <asp:Label runat="server" ID="lblRecordCount" CssClass="red" />
        <asp:Button runat="server" Visible="false" ID="btnPrint" Text="<%$Resources:General,Print%>"
            OnClientClick="javascript:window.print();return false;" CssClass="greenB ml10" />
        <asp:Button ID="btnDownLoad" runat="server" Visible="false" Text="<%$Resources:General,GenerateExcel%>"
            OnClick="btnDownLoad_Click" CssClass="greenB ml10" />
    </div>
    <div class="toggle">
        <div>
            <asp:GridView ID="grvSalesSummary" runat="server" AllowPaging="false" AutoGenerateColumns="False"
                Width="100%" EmptyDataText="<%$Resources:General,ErrNodata%>" CssClass="sTable bborder"
                GridLines="None" OnRowDataBound="grvSalesSummary_RowDataBound" AllowSorting="True"
                DataKeyNames="CeCarId,ProviderCompanyId">
                <Columns>
                    <asp:BoundField DataField="OrderDate" HeaderText="<%$Resources:NonGG,OrderDate%>"
                        SortExpression="OrderDate" DataFormatString="{0:dd/MM/yyyy hh:mm tt}" />
                    <asp:BoundField DataField="QuoteRefNo" HeaderText="<%$Resources:General,ReferenceNo%>"
                        SortExpression="QuoteRefNo" />
                    <asp:BoundField DataField="AgentName" HeaderText="<%$Resources:General,AgentName%>"
                        SortExpression="AgentName" />
                    <asp:BoundField DataField="ApplicationName" HeaderText="<%$Resources:General,CustomerName%>"
                        SortExpression="CustomerName" Visible="false" />
                    <asp:BoundField DataField="Insurer" HeaderText="<%$Resources:General,InsuranceCompany%>"
                        SortExpression="Insurer" />
                    <asp:BoundField DataField="InsuranceType" HeaderText="<%$Resources:Proposal,InsuranceType%>"
                        SortExpression="InsuranceType" />
                    <asp:BoundField DataField="IsCTPL" HeaderText="<%$Resources:NonGG,IsCTPL%>" SortExpression="IsCTPL" />
                    <asp:BoundField DataField="CTPL" HeaderText="<%$Resources:NonGG,CTPL%>" SortExpression="CTPL"
                        DataFormatString="฿{0:#,0.00}" />
                    <asp:BoundField DataField="Premium" HeaderText="<%$Resources:NonGG,NetPremium%>"
                        SortExpression="Premium" DataFormatString="฿{0:#,0.00}" />
                    <asp:BoundField DataField="TotalPremium" HeaderText="<%$Resources:NonGG,TotalPremium%>"
                        SortExpression="TotalPremium" DataFormatString="฿{0:#,0.00}" />
                    <asp:BoundField DataField="TotalCollectedPremium" HeaderText="<%$Resources:NonGG,CollectedPremium%>"
                        SortExpression="TotalCollectedPremium" DataFormatString="฿{0:#,0.00}" />
                </Columns>
                <FooterStyle />
                <PagerStyle />
                <SelectedRowStyle />
                <HeaderStyle />
                <EditRowStyle />
                <AlternatingRowStyle />
                <RowStyle />
            </asp:GridView>
            <div class="clear">
            </div>
            <div style="display: none">
                <asp:TextBox ID="txtReportType" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtReportDate1" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtReportDate2" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtReportDate" runat="server"></asp:TextBox>
                <asp:TextBox runat="server" ReadOnly="true" ID="txtAgentId"></asp:TextBox>
                <asp:Label ID="lblContent" runat="server"></asp:Label>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
</asp:Content>


